<%@ page import="com.lihuanyu.upcOA.conn.databaseUtil" %>
<%--
  Created by IntelliJ IDEA.
  User: skyADMIN
  Date: 15/9/3
  Time: 下午3:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  int uid = Integer.parseInt(request.getParameter("uid"));
  String username = request.getParameter("username");
  String psw = request.getParameter("psw");
  databaseUtil db = new databaseUtil();
  String sql = "INSERT INTO `teacher_login`(`uid`, `username`,`password`) VALUES ("+uid+",'"+username+"','"+psw+"')";
  db.executeUpdate(sql);
  sql = "INSERT INTO `teacher_info`(`uid`, `username`) VALUES ("+uid+",'"+username+"')";
  db.executeUpdate(sql);
  sql = "delete from teacher_reg where uid="+uid;
  db.executeUpdate(sql);
  db.sqlclose();
%>
<script>
  alert("同意成功！");
  window.location.href="admin.jsp";
</script>
